<?php

/*
 * реализация
 * $form->labelEx($model,'nickname');
 */

function smarty_function_afLabelEx($params, &$smarty)
{
    $widget = $smarty->getTemplateVars("_widgetActiveForm");
    $model = $smarty->getTemplateVars("_modelForWidgetActiveForm");
    if (!$widget)
    {
        throw new CException(Yii::t('afLabelEx must be applay fot widget ActiveForm'));
    }
    echo $widget->labelEx($model, $params['property'], $params['attr']);
}